<template>

  <el-container style="height: 97vh; ">
    <el-header height="auto">
    <list-header @getMenu="getMenu"> </list-header>
    </el-header>
    <el-container>
      <el-aside width="235px">
       <list-left ref="setChildMenu" @getTarget="getTarget"> </list-left>
      </el-aside>
      <el-container>
        <el-main>
          <list-main ref="setTarget"></list-main>
        </el-main>
        <!-- <el-footer>
          <v-footer />
        </el-footer> -->
      </el-container>
    </el-container>
  </el-container>
<div>
  </div>
</template>

<script>
// @ is an alias to /src
import listHeader from '@/components/list-header.vue'
import listLeft from '@/components/list-left.vue'
import listMain from '@/components/list-main.vue'
import {ref} from 'vue';

export default {
  components: {
      listHeader,
      listLeft,
      listMain
    },
  setup () {
    const setChildMenu = ref(null);
    const setTarget = ref(null);

    function getMenu(childMenu){
      setChildMenu.value.setLeftMenu(childMenu);
    }

    function getTarget(target){
      setTarget.value.setPageTarget(target);
    }
    return {
      getMenu,
      getTarget,
      setTarget,
      setChildMenu
      }
  
  }
}
</script>


<style>
  html,body,#app,.el-container{
        /*设置内部填充为0，几个布局元素之间没有间距*/
        padding: 0px;
         /*外部间距也是如此设置*/
        margin: 0px;
        /*统一设置高度为100%*/
        height: 100%;
    }

  .el-container {
    height: 100%;
  }

  .el-header, .el-footer {
    text-align: center;
    line-height: 60px;
  }

  .el-aside {
    text-align: left;
    line-height: 200px;
    padding-left: 20px;
  }

  .el-main {
    text-align: center;
    line-height: 160px;
  }

  body > .el-container {
    margin-bottom: 40px;
  }

  .el-container:nth-child(5) .el-aside,
  .el-container:nth-child(6) .el-aside {
    line-height: 260px;
  }

  .el-container:nth-child(7) .el-aside {
    line-height: 320px;
  }

</style>